#pragma once

#include <gmDisplayObject>
#include <gmPoint.h>
#include <gmDMatrix.h>


 using namespace GMlib;
 using GMlib::DVector;
 using GMlib::DMatrix;

 class TorBez : public DisplayObject {

  public:
		TorBez( DVector<Vector<double,3>> pts );


  protected:
    void localDisplay();
    void localSelect();
    void localSimulate( double dt );
		void bernstein(int d,double t,double delta);
		Vector<double,3> eval( double t, int d  );

  private:
    float     _size;
		Vector<double,3> _p;
		DVector<Vector<double,3>> _pts;
		DMatrix<double>	_bernsteinPoly;

    // Add following if you want to make the surroundingssphere visible
    // Sphere3D *_sphere;
 };
